1. Field of the Invention
The present invention relates to a moving direction detector that detects the moving direction and the position of a moving body by use of two groups of sensor elements.
2. Description of the Related Art
For example, there exists a moving direction detection method of detecting change in a magnetic field; in the foregoing method, respective electrodes are formed at the ends of magnetoresistance elements included in a giant magnetoresistance element (referred to as a GMR, hereinafter) GMR as a magnetoelectric conversion element so that a bridge circuit is configured; a constant-voltage and constant-current power source is connected between two electrodes, of the bridge circuit, that face each other; and a voltage change obtained through conversion of a resistance change of the magnetoresistance element is applied to the foregoing magnetoresistance element. An example of prior art is disclosed in Japanese Patent Application Laid-Open No. 2002-90181.
A conventional moving direction detector will be explained with reference to the accompanying drawings. FIG. 1 is a set of views illustrating the configuration of a moving direction detector. Because the moving direction detector in FIG. 1 according to the present invention has a configuration in common with the conventional moving direction detector, both the conventional detector and a detector according to the present invention will be explained with reference to FIG. 1. FIG. 1(a) is a perspective view; FIG. 1(b) is an enlarged plan view in the case where the perspective view is viewed from above.
As illustrated in FIG. 1, the moving direction detector is provided with a processing circuit unit 2 including two groups of sensor elements, i.e., magnetoresistance elements 21a and 21b, and 22; a magnet 1 disposed in the vicinity of the processing circuit unit 2; and a gear-shaped magnetic moving body 4 that has tooth-shaped protrusions facing the magnet 1 and rotates on a rotation axis 5. The magnetoresistance elements 21a, 21b, and 22 are arranged in a row along the moving direction of the magnetic moving body 4 and perceive a change in the magnetic field produced by the magnet 1, in accordance with the rotation of the magnetic moving body 4.
FIG. 10 is a diagram illustrating a conventional processing circuit unit for a moving direction detector utilizing magnetoresistance elements. In FIG. 10, the conventional processing circuit unit is configured with a first bridge circuit 301 including a magnetoresistance element 22 as a side and resistors 31 to 33, a second bridge circuit 302 including magnetoresistance elements 21a and 21b as two sides and resistors 34 and 35, a first comparison circuit 303 connected with the first bridge circuit 301, a second comparison circuit 304 connected with the second bridge circuit 302, a direction detection circuit 305 whose D terminal is connected with the output terminal of the first comparison circuit 303 and whose CL terminal is connected with the output terminal of the second comparison circuit 304 and that includes a D-type flip-flop, an OR circuit 306, output transistors 307 and 308, a resistor 309, and a computer unit 401.
In FIG. 10, the computer unit 401 connected with the output terminal of the output transistor 307 is provided with a third comparison circuit 402 in which the connection point 45 between resistors 41 and 42 is a point of a comparison level 1, and a fourth comparison circuit 403 in which the connection point 46 between resistors 43 and 44 is a point of a comparison level 2.
In FIG. 10, reference characters c to j located at respective points of the circuit denote signals at those points. A constant voltage VCC is applied to the bridge circuit 301 and the bridge circuit 302 that are configured with the magnetoresistance elements 21a, 21b, and 22 and the fixed resistors 31 to 35. Changes in the resistances of the magnetoresistance elements 21a, 21b, and 22 due to a change, in the magnetic field produced by the magnet 1, in response to the rotation of the magnetic moving body 4 are converted into voltage changes c and d. The signals c and d, which are voltage changes, are inputted to the first comparison circuit 303 and the second comparison circuit 304, respectively. Output voltages e and f, obtained through comparison with respective predetermined voltages and conversion into rectangular waves in the first comparison circuit 303 and the second comparison circuit 304, are inputted to the direction detection circuit 305, and then a direction signal g that indicates the moving direction of the magnetic moving body 4 is outputted. Next, the direction signal g outputted from the direction detection circuit 305 and the output signal f of the second comparison circuit 304 are inputted to the OR circuit 306, and then the respective output signals of the OR circuit 306 turn on or off the output transistors 307 and 308. Reference character h denotes the output signal of the transistor 307.
Here, while representing one of the moving directions of the magnetic moving body 4 as “a forward rotation” and the other as “a backward rotation”, and referring to the clockwise rotation as a forward rotation and the counterclockwise rotation as a backward rotation in the case where the magnetic moving body 4 is viewed from above in FIG. 1(a), the operation of the moving direction detector illustrated in FIG. 10 will be explained.
In FIG. 10, for example, in the case where the magnetic moving body 4 rotates forward, only the output transistor 307 is turned on or off; in the case where the magnetic moving body 4 rotates backward, only the output transistor 308 is turned on or off. Because the resistor 309 is inserted between the collector of the output transistor 308 and the collector of the output transistor 307, the level of the output voltage h is either a high level (the level denotes a voltage level, and the same, hereinafter) or a low level when the magnetic moving body 4 rotates forward; the level of the output voltage h is either a middle level or the low level when the magnetic moving body 4 rotates backward. Because, as described above, the level of the output of the processing circuit unit changes depending on whether the magnetic moving body 4 rotates forward or backward, the computer unit 401 that receives the output of the processing circuit unit can discriminate the moving direction of the magnetic moving body 4.
FIG. 11 represents signal waveforms at respective points in the detector illustrated in FIG. 10 in the case where the magnetic moving body 4 rotates on the rotation axis 5. Each of reference characters c to j in FIGS. 11 to 13 denotes a signal waveform at a point that has the same character in FIG. 10. In other words, character c denotes the output signal of the bridge circuit 301; character d denotes the output signal of the bridge circuit 302; character e denotes the output signal of the first comparison circuit 303; character f denotes the output signal of the second comparison circuit 304; character g denotes the output signal of the direction detection circuit 305; character h denotes the output signal of the output transistor 307; character i denotes the output signal of the third comparison circuit 402; and character j denotes the output signal of the fourth comparison circuit 403.
When the magnetic moving body 4 illustrated in FIG. 1 rotates on the rotation axis 5, the magnetic moving body 4 affects the magnetic field produced by the magnet 1, so that the magnetic field applied to the magnetoresistance elements 21a, 21b, and 22 is changed. FIG. 11(a) represents respective waveforms at points in the case where the magnetic moving body 4 rotates forward; FIG. 11(b) represents respective waveforms at points in the case where the magnetic moving body 4 rotates backward. As represented in FIG. 11, the respective output signals c and d of the bridge circuits 301 and 302 can be obtained in accordance with the depression/protrusion-shaped teeth of the magnetic moving body 4. The resistance values of the magnetoresistance elements 21a, 21b, and 22 change in accordance with the magnetic field applied thereto, and the changes in the resistance values result in changes in the voltages. The first comparison circuit 303 switches the output signal c, of the bridge circuit 301 in accordance with the shapes of the teeth of the magnetic moving body 4 so as to output the signal e, i.e., the rectangular wave, having a high level or a low level. The second comparison circuit 304 switches the output signal d of the bridge circuit 302 at a timing corresponding to the approximately middle point of a protrusive tooth of the magnetic moving body 4 so as to output the signal f, i.e., the rectangular wave having a high level or a low level.
In the signals f and h represented in FIG. 11, each of the arrows at the points where the rectangular wave is changed shows the switching direction, of the rectangular wave, at a timing corresponding to a point in the vicinity of the middle of the protrusive shape of a tooth of the magnetic moving body 4; for example, because, in FIG. 11(a), the level of the rectangular wave of the signal f is changed from a high level to a low level, at a timing corresponding to a point in the vicinity of the middle of the protrusive shape of a tooth of the magnetic moving body 4, the arrow is oriented in a direction from the high level to the low level; in contrast, because, in FIG. 11(b), the level of the rectangular wave of the signal f is changed from a low level to a high level, at a timing corresponding to a point in the vicinity of the middle of the protrusive shape of a tooth of the magnetic moving body 4, the arrow is oriented in a direction from the low level to the high level.
Here, attention will be paid to the output signal f of the second comparison circuit 304. The phase of the output signal f changes by 180° (it is assumed that a duration, between a rectangular wave switching position and the following rectangular wave switching position, including one high level and one low level corresponds to 360°, and the same, hereinafter) depending on the moving direction of the magnetic moving body 4, i.e., the forward rotation (a) or the backward rotation (b); therefore, for example, in the case where, at a falling timing of the rectangular wave of the signal f, the level of the rectangular wave of the signal e is high, it is determined that the magnetic moving body 4 rotates forward, and in the case where, at a falling timing of the rectangular wave of the signal f, the level of the rectangular wave of the signal e is low, it is determined that the magnetic moving body 4 rotates backward. Then, the direction detection circuit 305 outputs the low-level (forward rotation) output signal g or the high-level (backward rotation) output signal g, and the output signal f of the second comparison circuit 304 and the output signal g of the direction detection circuit 305 are inputted to the OR circuit 306, so that the waveforms, represented in FIGS. 11(a) and 11(b), of the output signal h of the output transistor 307 can be obtained.
In other words, when the magnetic moving body 4 rotates forward, the output level of the signal h becomes high or low, in accordance with the protrusion or depression as the shape of the teeth of the magnetic moving body 4; when the magnetic moving body 4 rotates backward, the output level of the signal h becomes high or middle, in accordance with the protrusion or depression as the shape of the teeth of the magnetic moving body 4.
The output signal h of the output transistor 307 is inputted to the computer unit 401; in the third comparison circuit 402, the output signal h is compared with a predetermined comparison level 1 that is applied to the connection point 45 between the resistors 41 and 42, and in the fourth comparison circuit 403, the output signal h is compared with a predetermined comparison level 2 that is applied to the connection point 46 between the resistors 43 and 44, so that the output signals i and j are obtained. When the magnetic moving body 4 rotates forward, both the output signals i and j become rectangular waves, and when the magnetic moving body 4 rotates backward, the output signal i becomes a rectangular wave, but no rectangular wave as the output signal j is outputted; therefore, the computer unit 401 can determine the moving direction of the magnetic moving body 4, by checking the output signals i and j.
FIGS. 12A and 12B represent that the respective occurrence timings of the signals f, e, g, and h at the respective points in the circuit illustrated in FIG. 10 change depending on a timing at which the magnetic moving body 4 changes its moving direction from the forward rotation to the backward rotation. AS the switching timing, four timings (A, B, C, and D) are represented; FIGS. 12A and 12B represent the foregoing signals f, e, g, and h and determination, performed by the computer unit 401, of whether the magnetic moving body 4 rotates forward or backward.
FIGS. 13A and 13B represent that the respective occurrence timings of the signals f, e, g, and h at the respective points in the circuit illustrated in FIG. 10 change depending on a timing at which the magnetic moving body 4 changes its moving direction from the backward rotation to the forward rotation. AS the switching timing, four timings (E, F, G, and H) are represented; FIGS. 13A and 13B represent the foregoing signals f, e, g, and h and determination, performed by the computer unit 401, of whether the magnetic moving body 4 rotates forward or backward.
Here, a prior art will be explained with reference to FIGS. 12A and 12B. By allocating symbols (s, t, u, and v) to the protrusive shapes of the teeth of the magnetic moving body 4, the computer unit 401 performs determination of the protrusive shape of the tooth of the magnetic moving body 4 and the moving direction thereof. The computer unit 401 performs determination of the moving direction based on the falling position (the timing at which the level changes from a high level to a low level, and the same, hereinafter) and the level of the rectangular wave of the signal h. For example, in the case where the magnetic moving body 4 rotates forward at the timing A, the signal h falls at a timing corresponding to a position in the vicinity of the middle of the protrusive shape of the tooth s, whereby the computer unit 401 determines that the tooth is s at a timing during the forward rotation.
However, depending on whether the position of the protrusive shape of the tooth is a position at a timing of the forward rotation or at a timing of the backward rotation, the timing when the computer unit 401 performs determination of the position of the protrusion changes. In other words, when the magnetic moving body 4 rotates forward at the timing A, the computer unit 401 performs determination of the tooth s or t during the forward rotation at a timing corresponding to the middle of the protrusive shape of the tooth s or t; in contrast, when the magnetic moving body 4 rotates backward at the timing A, the computer unit 401 performs determination of the tooth s or t during the backward rotation at a timing corresponding to the middle of the depressed shape near the tooth s or t.
Here, when being represented by a phase, the duration between the falling edge of the rectangular wave of the signal h and the following falling edge is 360°; the duration between the falling edge of the rectangular wave of the signal h and the following rising edge is 180°.
For example, when the magnetic moving body 4 rotates forward at the timing A, the computer unit 401 recognizes the symbol (s or t) of the protrusive shape of the tooth, at a timing corresponding to a position in the vicinity of the middle of the protrusive shape of the tooth; however, when the magnetic moving body 4 rotates backward at the timing A, the computer unit 401 recognizes the protrusion symbol, at a timing corresponding to a position that is 180° delayed from the protrusive shape t of the tooth. Additionally, when the magnetic moving body 4 rotates forward at the timing C, the computer unit 401 recognizes the symbol (s or t) of the protrusive shape of the tooth, at a timing corresponding to a position in the vicinity of the middle of the protrusive shape of the tooth; however, when the magnetic moving body 4 rotates backward at the timing A, the computer unit 401 recognizes the protrusion symbol, at a timing corresponding to a position that is 180° advanced from the protrusive shape t of the tooth.
Accordingly, in a conventional moving direction detector configured as described above, the computer unit can recognize the moving direction of the magnetic moving body 4; however, depending on the moving direction, it has been difficult to accurately recognize the position of the protrusive shape of the tooth of the magnetic moving body 4.